using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DefenseTools._GriddedReferenceGraphic
{
    /// <summary>
    /// <para>Generate Grid From Point</para>
    /// <para>Generates a Gridded Reference Graphic (GRG) as a polygon feature class over a specified area with a custom size.</para>
    /// <para>在指定区域上以自定义大小将网格参考图形 （GRG） 生成为面要素类。</para>
    /// </summary>    
    [DisplayName("Generate Grid From Point")]
    public class GenerateGRGFromPoint : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public GenerateGRGFromPoint()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_feature">
        /// <para>Input Feature</para>
        /// <para>The center point for the GRG starting point.</para>
        /// <para>GRG 起点的中心点。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The output polygon feature class containing the GRG to be created.</para>
        /// <para>包含要创建的 GRG 的输出面要素类。</para>
        /// </param>
        public GenerateGRGFromPoint(object _in_feature, object _out_feature_class)
        {
            this._in_feature = _in_feature;
            this._out_feature_class = _out_feature_class;
        }
        public override string ToolboxName => "Defense Tools";

        public override string ToolName => "Generate Grid From Point";

        public override string CallName => "defense.GenerateGRGFromPoint";

        public override List<string> AcceptEnvironments => ["outputCoordinateSystem", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_feature, _out_feature_class, _horizontal_cells, _vertical_cells, _cell_width, _cell_height, _cell_units.GetGPValue(), _label_start_position.GetGPValue(), _label_format.GetGPValue(), _label_separator.GetGPValue(), _grid_angle, _grid_angle_units.GetGPValue()];

        /// <summary>
        /// <para>Input Feature</para>
        /// <para>The center point for the GRG starting point.</para>
        /// <para>GRG 起点的中心点。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Feature")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_feature { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The output polygon feature class containing the GRG to be created.</para>
        /// <para>包含要创建的 GRG 的输出面要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Number of Rows</para>
        /// <para>The number of horizontal grid cells.</para>
        /// <para>水平网格像元的数量。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Number of Rows")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _horizontal_cells { get; set; } = 10;


        /// <summary>
        /// <para>Number of Columns</para>
        /// <para>The number of vertical grid cells.</para>
        /// <para>垂直网格像元的数量。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Number of Columns")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _vertical_cells { get; set; } = 10;


        /// <summary>
        /// <para>Cell Width</para>
        /// <para>The width of the cells. Measurement units are specified by the Cell Units parameter.</para>
        /// <para>单元格的宽度。测量单位由单元单位参数指定。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Cell Width")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _cell_width { get; set; } = 1000;


        /// <summary>
        /// <para>Cell Height</para>
        /// <para>The height of the cells. Measurement units are specified by the Cell Units parameter.</para>
        /// <para>单元格的高度。测量单位由单元单位参数指定。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Cell Height")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _cell_height { get; set; } = 1000;


        /// <summary>
        /// <para>Cell Units</para>
        /// <para><xdoc>
        ///   <para>Specifies the measurement units for cell width and height.</para>
        ///   <bulletList>
        ///     <bullet_item>Meters—The unit will be meters. This is the default.</bullet_item><para/>
        ///     <bullet_item>Kilometers—The unit will be kilometers.</bullet_item><para/>
        ///     <bullet_item>Miles—The unit will be miles.</bullet_item><para/>
        ///     <bullet_item>Nautical miles—The unit will be nautical miles.</bullet_item><para/>
        ///     <bullet_item>Feet—The unit will be feet.</bullet_item><para/>
        ///     <bullet_item>US survey feet—The unit will be U.S. survey feet.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定单元格宽度和高度的测量单位。</para>
        ///   <bulletList>
        ///     <bullet_item>米—单位将为米。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>千米—单位将为千米。</bullet_item><para/>
        ///     <bullet_item>英里—单位将为英里。</bullet_item><para/>
        ///     <bullet_item>海里—单位将为海里。</bullet_item><para/>
        ///     <bullet_item>英尺—单位将为英尺。</bullet_item><para/>
        ///     <bullet_item>美国测量英尺—单位为美国测量英尺。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Cell Units")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _cell_units_value _cell_units { get; set; } = _cell_units_value._METERS;

        public enum _cell_units_value
        {
            /// <summary>
            /// <para>Meters</para>
            /// <para>Meters—The unit will be meters. This is the default.</para>
            /// <para>米—单位将为米。这是默认设置。</para>
            /// </summary>
            [Description("Meters")]
            [GPEnumValue("METERS")]
            _METERS,

            /// <summary>
            /// <para>Kilometers</para>
            /// <para>Kilometers—The unit will be kilometers.</para>
            /// <para>千米—单位将为千米。</para>
            /// </summary>
            [Description("Kilometers")]
            [GPEnumValue("KILOMETERS")]
            _KILOMETERS,

            /// <summary>
            /// <para>Miles</para>
            /// <para>Miles—The unit will be miles.</para>
            /// <para>英里—单位将为英里。</para>
            /// </summary>
            [Description("Miles")]
            [GPEnumValue("MILES")]
            _MILES,

            /// <summary>
            /// <para>Nautical miles</para>
            /// <para>Nautical miles—The unit will be nautical miles.</para>
            /// <para>海里—单位将为海里。</para>
            /// </summary>
            [Description("Nautical miles")]
            [GPEnumValue("NAUTICAL_MILES")]
            _NAUTICAL_MILES,

            /// <summary>
            /// <para>Feet</para>
            /// <para>Feet—The unit will be feet.</para>
            /// <para>英尺—单位将为英尺。</para>
            /// </summary>
            [Description("Feet")]
            [GPEnumValue("FEET")]
            _FEET,

            /// <summary>
            /// <para>US survey feet</para>
            /// <para>US survey feet—The unit will be U.S. survey feet.</para>
            /// <para>美国测量英尺—单位为美国测量英尺。</para>
            /// </summary>
            [Description("US survey feet")]
            [GPEnumValue("US_SURVEY_FEET")]
            _US_SURVEY_FEET,

        }

        /// <summary>
        /// <para>Label Start Position</para>
        /// <para><xdoc>
        ///   <para>Specifies the grid cell where labelling will start.</para>
        ///   <bulletList>
        ///     <bullet_item>Upper left—The label position will be the upper left. This is the default.</bullet_item><para/>
        ///     <bullet_item>Lower left—The label position will be the lower left.</bullet_item><para/>
        ///     <bullet_item>Upper right—The label position will be the upper right.</bullet_item><para/>
        ///     <bullet_item>Lower right—The label position will be in the lower right.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将开始标记的网格单元格。</para>
        ///   <bulletList>
        ///     <bullet_item>左上角 - 标注位置为左上角。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>左下角 - 标注位置为左下角。</bullet_item><para/>
        ///     <bullet_item>右上角 - 标注位置为右上角。</bullet_item><para/>
        ///     <bullet_item>右下角 - 标注位置将位于右下角。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Label Start Position")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _label_start_position_value _label_start_position { get; set; } = _label_start_position_value._UPPER_LEFT;

        public enum _label_start_position_value
        {
            /// <summary>
            /// <para>Upper left</para>
            /// <para>Upper left—The label position will be the upper left. This is the default.</para>
            /// <para>左上角 - 标注位置为左上角。这是默认设置。</para>
            /// </summary>
            [Description("Upper left")]
            [GPEnumValue("UPPER_LEFT")]
            _UPPER_LEFT,

            /// <summary>
            /// <para>Lower left</para>
            /// <para>Lower left—The label position will be the lower left.</para>
            /// <para>左下角 - 标注位置为左下角。</para>
            /// </summary>
            [Description("Lower left")]
            [GPEnumValue("LOWER_LEFT")]
            _LOWER_LEFT,

            /// <summary>
            /// <para>Upper right</para>
            /// <para>Upper right—The label position will be the upper right.</para>
            /// <para>右上角 - 标注位置为右上角。</para>
            /// </summary>
            [Description("Upper right")]
            [GPEnumValue("UPPER_RIGHT")]
            _UPPER_RIGHT,

            /// <summary>
            /// <para>Lower right</para>
            /// <para>Lower right—The label position will be in the lower right.</para>
            /// <para>右下角 - 标注位置将位于右下角。</para>
            /// </summary>
            [Description("Lower right")]
            [GPEnumValue("LOWER_RIGHT")]
            _LOWER_RIGHT,

        }

        /// <summary>
        /// <para>Label Format</para>
        /// <para><xdoc>
        ///   <para>Specifies the labeling type for each grid cell.</para>
        ///   <bulletList>
        ///     <bullet_item>Alpha-numeric—The label will use an alpha character, a separator, and a number for the label. This is the default.</bullet_item><para/>
        ///     <bullet_item>Alpha-alpha—The label will use an alpha character, a separator, and an additional alpha character for the label.</bullet_item><para/>
        ///     <bullet_item>Numeric—The label will be numeric.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定每个网格单元格的标注类型。</para>
        ///   <bulletList>
        ///     <bullet_item>字母数字 - 标注将使用字母字符、分隔符和标注数字。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>Alpha-alpha—标注将使用标注的 alpha 字符、分隔符和其他 alpha 字符。</bullet_item><para/>
        ///     <bullet_item>数字 - 标注将为数字。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Label Format")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _label_format_value _label_format { get; set; } = _label_format_value._ALPHA_NUMERIC;

        public enum _label_format_value
        {
            /// <summary>
            /// <para>Alpha-numeric</para>
            /// <para>Alpha-numeric—The label will use an alpha character, a separator, and a number for the label. This is the default.</para>
            /// <para>字母数字 - 标注将使用字母字符、分隔符和标注数字。这是默认设置。</para>
            /// </summary>
            [Description("Alpha-numeric")]
            [GPEnumValue("ALPHA_NUMERIC")]
            _ALPHA_NUMERIC,

            /// <summary>
            /// <para>Alpha-alpha</para>
            /// <para>Alpha-alpha—The label will use an alpha character, a separator, and an additional alpha character for the label.</para>
            /// <para>Alpha-alpha—标注将使用标注的 alpha 字符、分隔符和其他 alpha 字符。</para>
            /// </summary>
            [Description("Alpha-alpha")]
            [GPEnumValue("ALPHA_ALPHA")]
            _ALPHA_ALPHA,

            /// <summary>
            /// <para>Numeric</para>
            /// <para>Numeric—The label will be numeric.</para>
            /// <para>数字 - 标注将为数字。</para>
            /// </summary>
            [Description("Numeric")]
            [GPEnumValue("NUMERIC")]
            _NUMERIC,

        }

        /// <summary>
        /// <para>Label Separator</para>
        /// <para><xdoc>
        ///   <para>Specifies the separator to be used between x- and y-values when the Label Format parameter is set to Alpha-alpha, for example, A-A, A-AA, AA-A.</para>
        ///   <bulletList>
        ///     <bullet_item>Hyphen—The label separator will be a hyphen. This is the default.</bullet_item><para/>
        ///     <bullet_item>Comma—The label separator will be a comma.</bullet_item><para/>
        ///     <bullet_item>Period—The label separator will be a period.</bullet_item><para/>
        ///     <bullet_item>Forward slash—The label separator will be a forward slash.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定当标签格式参数设置为 Alpha-alpha 时要在 x 值和 y 值之间使用的分隔符，例如 A-A、A-AA、AA-A。</para>
        ///   <bulletList>
        ///     <bullet_item>连字符—标签分隔符将为连字符。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>逗号—标签分隔符将为逗号。</bullet_item><para/>
        ///     <bullet_item>句点 - 标签分隔符将为句点。</bullet_item><para/>
        ///     <bullet_item>正斜杠 - 标签分隔符将为正斜杠。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Label Separator")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _label_separator_value _label_separator { get; set; } = _label_separator_value.value0;

        public enum _label_separator_value
        {
            /// <summary>
            /// <para>Hyphen</para>
            /// <para>Hyphen—The label separator will be a hyphen. This is the default.</para>
            /// <para>连字符—标签分隔符将为连字符。这是默认设置。</para>
            /// </summary>
            [Description("Hyphen")]
            [GPEnumValue("-")]
            value0,

            /// <summary>
            /// <para>Comma</para>
            /// <para>Comma—The label separator will be a comma.</para>
            /// <para>逗号—标签分隔符将为逗号。</para>
            /// </summary>
            [Description("Comma")]
            [GPEnumValue(",")]
            value1,

            /// <summary>
            /// <para>Period</para>
            /// <para>Period—The label separator will be a period.</para>
            /// <para>句点 - 标签分隔符将为句点。</para>
            /// </summary>
            [Description("Period")]
            [GPEnumValue(".")]
            value2,

            /// <summary>
            /// <para>Forward slash</para>
            /// <para>Forward slash—The label separator will be a forward slash.</para>
            /// <para>正斜杠 - 标签分隔符将为正斜杠。</para>
            /// </summary>
            [Description("Forward slash")]
            [GPEnumValue("/")]
            value3,

        }

        /// <summary>
        /// <para>Grid Rotation Angle</para>
        /// <para>The angle used to rotate the grid.</para>
        /// <para>用于旋转网格的角度。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Grid Rotation Angle")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _grid_angle { get; set; } = 0;


        /// <summary>
        /// <para>Grid Rotation Angular Units</para>
        /// <para><xdoc>
        ///   <para>The angular units for grid rotation.</para>
        ///   <bulletList>
        ///     <bullet_item>Degrees—The angle will be degrees. This is the default.</bullet_item><para/>
        ///     <bullet_item>Mils—The angle will be mils.</bullet_item><para/>
        ///     <bullet_item>Radians—The angle will be radians.</bullet_item><para/>
        ///     <bullet_item>Gradians—The angle will be gradians.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于网格旋转的角度单位。</para>
        ///   <bulletList>
        ///     <bullet_item>度 - 角度将为度。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>密耳—角度为密耳。</bullet_item><para/>
        ///     <bullet_item>弧度—角度为弧度。</bullet_item><para/>
        ///     <bullet_item>坡度线—角度将为坡度线。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Grid Rotation Angular Units")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _grid_angle_units_value _grid_angle_units { get; set; } = _grid_angle_units_value._DEGREES;

        public enum _grid_angle_units_value
        {
            /// <summary>
            /// <para>Degrees</para>
            /// <para>Degrees—The angle will be degrees. This is the default.</para>
            /// <para>度 - 角度将为度。这是默认设置。</para>
            /// </summary>
            [Description("Degrees")]
            [GPEnumValue("DEGREES")]
            _DEGREES,

            /// <summary>
            /// <para>Mils</para>
            /// <para>Mils—The angle will be mils.</para>
            /// <para>密耳—角度为密耳。</para>
            /// </summary>
            [Description("Mils")]
            [GPEnumValue("MILS")]
            _MILS,

            /// <summary>
            /// <para>Radians</para>
            /// <para>Radians—The angle will be radians.</para>
            /// <para>弧度—角度为弧度。</para>
            /// </summary>
            [Description("Radians")]
            [GPEnumValue("RADS")]
            _RADS,

            /// <summary>
            /// <para>Gradians</para>
            /// <para>Gradians—The angle will be gradians.</para>
            /// <para>坡度线—角度将为坡度线。</para>
            /// </summary>
            [Description("Gradians")]
            [GPEnumValue("GRADS")]
            _GRADS,

        }

        public GenerateGRGFromPoint SetEnv(object outputCoordinateSystem = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(outputCoordinateSystem: outputCoordinateSystem, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}